<?php
/**
 * Voyage sur mesure actions
 * 
 */
class contactVoyageActions extends myFrontModuleActions
{

  public function executeFormWidget(dmWebRequest $request)
  {
    $form = new ContactVoyageForm();
        
    if ($request->hasParameter($form->getName()) && $form->bindAndValid($request))
    {
      $form->save();
      $this->redirectBack();
    }
    
    $this->forms['ContactVoyage'] = $form;
  }

  public function executeFormulaireWidget(dmWebRequest $request)
  {
    $form = new ContactVoyageForm();
        
    if ($request->hasParameter($form->getName()) && $form->bindAndValid($request))
    {
      $this->getUser()->setFlash('demande', 'Votre demande a été prise en compte');
      $form->save();
      $this->redirectBack();
    }
    
    $this->forms['ContactVoyage'] = $form;
  }


}
